package com.taotao.web;

import com.taotao.service.TbContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author evader
 * @date 2020-09-27 17:02
 */
@Controller
public class TbContentController {

    @Autowired
    private TbContentService tbContentService;

    @RequestMapping("/")
    public String lunbotu(Model model){
        //取轮播图的内容信息
        String contentList = tbContentService.getContentList();

        //把数据传递给页面。
        model.addAttribute("ad1", contentList);

        return "index";
    }
}
